Skip to content

ext/pcntl: use RETURN_THROWS() instead of RETURN_FALSE when exception…#21297

Closed
devnexen wants to merge 2 commits intophp:PHP-8.4from
devnexen:pcntl_exception_handling_fixes
Closed

ext/pcntl: use RETURN_THROWS() instead of RETURN_FALSE when exception…#21297
devnexen wants to merge 2 commits intophp:PHP-8.4from
devnexen:pcntl_exception_handling_fixes

Conversation

@devnexen
Copy link
Member

… is pending

In pcntl_sigprocmask(), pcntl_sigwaitinfo(), and pcntl_sigtimedwait().

… is pending

In pcntl_sigprocmask(), pcntl_sigwaitinfo(), and pcntl_sigtimedwait().
@devnexen devnexen marked this pull request as ready for review February 25, 2026 19:51
@ndossche
Copy link
Member

This isn't really a fix. Returning false when throwing an exception is valid. I feel like the new code adds an extra check that makes the code harder to read. Adding a test is fine of course.

@Girgias
Copy link
Member

Girgias commented Feb 26, 2026

I agree with @ndossche, but the new test is good.

…alid signals

Revert the RETURN_THROWS() changes as RETURN_FALSE when an exception
is pending is valid behaviour. Keep the test covering invalid signal
handling for pcntl_sigprocmask(), pcntl_sigwaitinfo(), and
pcntl_sigtimedwait().
@devnexen devnexen closed this in cf9d6f4 Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants